<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div,
      p {
        border: solid;
        height: 200px;
        margin: 20px;
      }
    </style>
  </head>
  <body>
    <button id="btn">提交</button>
    <script>
      const btn = document.getElementById("btn");
      // 监听事件
      btn.onclick = function () {
        console.log(this);
        console.log(this === btn);
      };
      // 通过事件调用，通过用户行为发送“信号”调用
      // btn.onclick();
    </script>
  </body>
</html>
